package com.wenx.v3system.modular.cloud.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.Min;
import java.util.List;

/**
 * 通用请求DTO
 * 合并所有请求场景的通用数据传输对象
 */
@Data
@Schema(description = "通用请求参数")
public class TeamRequestDto {

    // 单个ID相关
    @Schema(description = "ID", example = "1001")
    private Long id;

    @Schema(description = "团队ID", example = "1001")
    private Long teamId;

    @Schema(description = "用户ID", example = "3001")
    private Long userId;

    // 批量ID相关
    @Schema(description = "ID列表", example = "[1001, 1002, 1003]")
    private List<Long> ids;

    @Schema(description = "用户ID列表", example = "[3001, 3002, 3003]")
    private List<Long> userIds;

    @Schema(description = "角色ID列表", example = "[2001, 2002, 2003]")
    private List<Long> roleIds;

    // 分页相关
    @Min(value = 1, message = "当前页码必须大于0")
    @Schema(description = "当前页码", example = "1", defaultValue = "1")
    private Integer current = 1;

    @Min(value = 1, message = "每页大小必须大于0")
    @Schema(description = "每页大小", example = "10", defaultValue = "10")
    private Integer size = 10;

    // 搜索相关
    @Schema(description = "搜索关键词", example = "张三")
    private String keyword;

    @Schema(description = "编码", example = "DEV_TEAM")
    private String code;

    // 其他通用字段
    @Schema(description = "排除的ID（用于编辑时排除自身）", example = "1001")
    private Long excludeId;

    @Schema(description = "父级ID", example = "1000")
    private Long parentId;

    @Schema(description = "操作原因", example = "权限调整")
    private String reason;

    @Schema(description = "是否覆盖现有数据", example = "false")
    private Boolean overwrite = false;
}